package com.flyco.modules.stm.entity;

import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.flyco.common.aspect.annotation.Dict;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import com.flyco.poi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @Description: 门店要货明细
 * @Author: flyco
 * @Date:   2020-11-23
 * @Version: V1.0
 */
@Data
@TableName("stm_replenishment_item")
@ApiModel(value="stm_replenishment对象", description="门店要货单")
public class StmReplenishmentItem implements Serializable {
    private static final long serialVersionUID = 1L;

	/**id*/
	@TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "id")
	private Long id;
	/**补货单id*/
    @ApiModelProperty(value = "补货单id")
	private Long replenishmentId;
	/**商品id*/
    @ApiModelProperty(value = "商品id")
	private Long productId;
	/**商品货号*/
    @Excel(name = "商品货号", width = 15)
    @ApiModelProperty(value = "商品货号")
	private String productSn;
    @ApiModelProperty(value = "商品货号")
	private String productName;
	/**补货数量*/
    @Excel(name = "补货数量", width = 15)
    @ApiModelProperty(value = "补货数量")
	private Integer productQty;

	@ApiModelProperty(value = "发货数量")
	private Integer sendQty;

	@ApiModelProperty(value = "收货数量")
	private Integer receiveQty;

	/**库存类别*/
	@Excel(name = "库存类别", width = 15)
	@ApiModelProperty(value = "库存类别")
	private String stockType;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
	private String createBy;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
	private java.util.Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
	private String updateBy;
	/**更新时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
	private java.util.Date updateTime;

	/**虚拟主键*/
	@TableField(exist = false)
	private String itemKey;

	/**店铺名称*/
	@TableField(exist = false)
	private String storeId_dictText;
	/**商品名称*/
	@TableField(exist = false)
	private String productId_dictText;

	/**库存类别名称*/
	@TableField(exist = false)
	private String stockType_dictText;

	public void setStockTypeDictText() {
		switch (stockType){
			case "STOCK_TYPE_GOODS":
				stockType_dictText = "商品";
				return;
			case "STOCK_TYPE_GIFT":
				stockType_dictText = "赠品";
				return;
			case "STOCK_TYPE_SAMPLE":
				stockType_dictText = "样品";
				return;
			default:
				stockType_dictText = "未知"+stockType;
		}
	}
}
